# Maintainer: Ronald van Haren <ronald.archlinux.org>
# Contributor: damir <damir@archlinux.org>
# Contributor: Tobias Powalowski <t.powa@gmx.de>

pkgname=pstoedit
pkgver=3.76
pkgrel=1
pkgdesc="Translates PostScript and PDF graphics into other vector formats"
arch=('x86_64')
url="http://www.pstoedit.net/"
license=('GPL')
depends=('gcc-libs' 'plotutils' 'gd' 'imagemagick')
makedepends=('ghostscript')
source=("https://downloads.sourceforge.net/sourceforge/pstoedit/pstoedit-${pkgver}.tar.gz")
sha512sums=('58aed0231a380d887092af894332f562d13ada9728ebfd0a41ec3409bb488dc773abb1b69dcaa2a2625c66bc9ae822ff075c7d3f057100dd248bf06035800862')

prepare() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  sed -e 's|ImageMagick++|Magick++|' -i configure.ac
  autoreconf -vi
}

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  ./configure --prefix=/usr
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
}
